package src.main.java.org.thread.exercise;

public class MyRunnable implements Runnable{
    private int count; //记录浏览人次
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            synchronized (this){ //悲观锁
                System.out.println("count ====>"+ ++count);
            }

        }
    }
}
